home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 20 / AMIGAplus Sonderheft 20 (1999)(ICP)(DE)[!].iso / Magazin / Future-PD / MysticView / Install < prev    next >
Text File  |  1999-01-01  |  10KB  |  374 lines

  1.  
  2. ;      *** MysticView installation scipt ***
  3.  
  4.  
  5.     ; *** versions ***
  6.  
  7.     (set ver (getversion "MysticView"))
  8.     (set tver (/ ver 65536))
  9.     (set trev (- ver (* tver 65536)))
  10.     (set #MysticVersion (cat tver "." trev))
  11.  
  12.     (set ver (getversion "libs/render.library"))
  13.     (set renderversion (/ ver 65536))
  14.     (set renderrevision (- ver (* renderversion 65536)))
  15.  
  16.     (set ver (getversion "libs/guigfx.library"))
  17.     (set guigfxversion (/ ver 65536))
  18.     (set guigfxrevision (- ver (* guigfxversion 65536)))
  19.  
  20.     (set ver (getversion "libs/mysticview.library"))
  21.     (set mysticlibversion (/ ver 65536))
  22.     (set mysticlibrevision (- ver (* mysticlibversion 65536)))
  23.  
  24.     (set ver (getversion "libs/neuralnet.library"))
  25.     (set neuralnetversion (/ ver 65536))
  26.     (set neuralnetrevision (- ver (* neuralnetversion 65536)))
  27.  
  28.     (set oldrenderversion 0)
  29.     (set oldrenderrevision 0)
  30.     (if (> (exists ("libs:render.library")) 0)
  31.         (
  32.             (set ver (getversion "libs:render.library"))
  33.             (set oldrenderversion (/ ver 65536))
  34.             (set oldrenderrevision (- ver (* oldrenderversion 65536)))
  35.         )
  36.     )
  37.  
  38.     (set oldguigfxversion 0)
  39.     (set oldguigfxrevision 0)
  40.     (if (> (exists ("libs:guigfx.library")) 0)
  41.         (
  42.             (set ver (getversion "libs:guigfx.library"))
  43.             (set oldguigfxversion (/ ver 65536))
  44.             (set oldguigfxrevision (- ver (* oldguigfxversion 65536)))
  45.         )
  46.     )
  47.  
  48.     (set oldmysticlibversion 0)
  49.     (set oldmysticlibrevision 0)
  50.     (if (> (exists ("libs:mysticview.library")) 0)
  51.         (
  52.             (set ver (getversion "libs:mysticview.library"))
  53.             (set oldmysticlibversion (/ ver 65536))
  54.             (set oldmysticlibrevision (- ver (* oldmysticlibversion 65536)))
  55.         )
  56.     )
  57.  
  58.     (set oldneuralnetbversion 0)
  59.     (set oldneuralnetrevision 0)
  60.     (if (> (exists ("libs:neuralnet.library")) 0)
  61.         (
  62.             (set ver (getversion "libs:neuralnet.library"))
  63.             (set oldneuralnetversion (/ ver 65536))
  64.             (set oldneuralnetrevision (- ver (* oldneuralnetversion 65536)))
  65.         )
  66.     )
  67.     
  68. ;****************************************************************************
  69. ;
  70. ;    English texts
  71. ;
  72.  
  73.     (if (not (= @language "deutsch"))
  74.         (
  75.             (set #install-msg (cat    "\n\nMysticView installation script.\n\n"
  76.                         "this script will install MysticView " #MysticVersion " to your system.\n\n"
  77.                         "MysticView © 1997-99 by TEK neoscientists\n"))
  78.  
  79.             (set #welcome-msg          "welcome to the MysticView installation process.")
  80.             (set #bad-kick            "you need at least os3.0 (v39) to use this program.")
  81.             (set #bad-cpu            "you need at least a 68020 processor.");
  82.             (set #bad-installer        "you must be using Installer v43 to install MysticView.")
  83.             (set #ask-prog-dir        "where shall i install MysticView? a drawer will NOT be created. sys:utilities is recommended.")
  84.             (set #ask-help-dir        "where shall i install the documentation?")
  85.             (set #copy-msg            "copying files to ")
  86.             (set #install-presets    "do you want to install sample presets?")
  87.             (set #install-presets-path    "where do yo want to copy the sample presets to?")
  88.             (set #icon-exists-msg    "an old MysticView icon has been found. many tooltypes changed, or they are no longer supported. do you want to overwrite the old icon?")
  89.             (set #library-note        "MysticView has been installed successfully. please note that obsolete versions of some libraries might be still in use. reboot your system if MysticView complains about missing libraries.")
  90.         )
  91.     )
  92.  
  93. ;****************************************************************************
  94. ;
  95. ;    Deutsche Texte
  96. ;
  97.  
  98.     (if (= @language "deutsch")
  99.         (
  100.             (set #install-msg (cat    "\n\nMysticView installationsskript.\n\n"
  101.                                     "dieses skript installiert MysticView " #MysticVersion " auf ihrem system.\n\n"
  102.                                     "MysticView © 1997-99 by TEK neoscientists\n"))
  103.  
  104.             (set #welcome-msg          "willkommen zur installation von MysticView")
  105.             (set #bad-kick            "sie benötigen mindestens os3.0 (v39).")
  106.             (set #bad-cpu            "sie benötigen mindestens einen 68020 prozessor.");
  107.             (set #bad-installer        "sie benötigen den Installer v43, um MysticView zu installieren.")
  108.             (set #ask-prog-dir        "wo soll MysticView installiert werden? ein verzeichnis wird NICHT angelegt. sys:utilities wird empfohlen.")
  109.             (set #ask-help-dir        "wohin soll die anleitung kopiert werden?")
  110.             (set #copy-msg            "kopiere dateien nach ")
  111.             (set #install-presets    "wollen sie beispielkonfigurationen installieren?")
  112.             (set #install-presets-path    "wohin sollen die beispielkonfigurationen kopiert werden?")
  113.             (set #icon-exists-msg    "ein altes piktogramm wurde gefunden. viele alte piktogramm-eigenschaften haben sich geändert oder werden nicht mehr unterstützt. wollen Sie das alte piktogramm überschreiben?")
  114.             (set #library-note        "MysticView wurde erfolgreich installiert. bitte beachten sie, daß noch alte versionen einiger funktionsbibliotheken in gebrauch sein könnten. starten sie ihr system neu, wenn sich MysticView über fehlende funktionsbibliotheken beschwert.")
  115.         )
  116.     )
  117.  
  118.  
  119. ;****************************************************************************
  120. ;
  121. ;    installation process
  122. ;
  123.  
  124.  
  125.     ; *** Welcome the user to the installation
  126.  
  127.     (message #install-msg)
  128.  
  129.  
  130.     ; *** Check for Kickstart version ***
  131.  
  132.     (if (< (/ (getversion) 65536) 39)
  133.         ((abort #bad-kick))
  134.     )
  135.  
  136.  
  137.     ; *** Check for Installer-Version ***
  138.  
  139.     (if (< (/ @installer-version 65536) 43)
  140.         ((abort #bad-installer))
  141.     )
  142.  
  143.  
  144.     ; *** Check for CPU ***
  145.  
  146.     (if (patmatch "68000|68010" (database "cpu"))
  147.         (abort #bad-cpu)
  148.     )
  149.  
  150.  
  151.   
  152.     ; *** Ask the user for the destination ***
  153.  
  154.     (set #prog-dest
  155.         (askdir (prompt #ask-prog-dir)
  156.                 (help @askdir-help)
  157.                 (default "sys:utilities/")
  158.         )
  159.     )
  160.  
  161.  
  162.     ; *** Check for an already existing icon ***
  163.  
  164.     (set #iconname (tackon #prog-dest "Mysticview.info"))
  165.     (set #iconexists (> (exists #iconname) 0))
  166.  
  167.  
  168.     ; *** Ask the user whether to overwrite the icon ***
  169.  
  170.     (if #iconexists
  171.         (
  172.             (set ver (getversion (tackon #prog-dest "MysticView")))
  173.             (set tver (/ ver 65536))
  174.             (set trev (- ver (* tver 65536)))
  175.  
  176.             (if (AND (<= tver 0) (<= trev 98))
  177.                 (
  178.                     (set #iconexists
  179.                         (askbool
  180.                             (prompt #icon-exists-msg)
  181.                             (help @askdir-help)
  182.                         )
  183.                     )
  184.                 )
  185.             )
  186.         )
  187.     )
  188.  
  189.  
  190.     (set #help-dest
  191.         (askdir    (prompt #ask-help-dir)
  192.                 (help @askdir-help)
  193.                 (default #prog-dest)
  194.         )
  195.     )
  196.  
  197.  
  198.     ; *** Ask for the preset installation / path ***
  199.  
  200.     (set #copypresets
  201.         (askbool
  202.             (prompt #install-presets)
  203.             (help @askdir-help)
  204.         )
  205.     )
  206.     
  207.     (if #copypresets
  208.         (set #presets-dest
  209.             (askdir (prompt #install-presets-path)
  210.                     (help @askdir-help)
  211.                     (default "sys:prefs/presets")
  212.             )
  213.         )
  214.     )
  215.  
  216.  
  217.     ; *** Copy libs ***
  218.  
  219.     (if (> renderversion oldrenderversion)
  220.         (
  221.             (set #render-lib "libs/render.library")
  222.             (if (patmatch "68040" (database "cpu")) (set #render-lib "libs/render.library_68040"))
  223.             (if (patmatch "68060" (database "cpu")) (set #render-lib "libs/render.library_68060"))
  224.     
  225.             (copylib (prompt #copy-msg "LIBS:")
  226.                 (help @copylib-help)
  227.                 (source #render-lib)
  228.                 (dest "LIBS:")
  229.                 (newname "render.library")
  230.             )
  231.         )
  232.     )
  233.  
  234.  
  235.  
  236.     (if (> guigfxversion oldguigfxversion)
  237.         (
  238.             (set #guigfx-lib "libs/guigfx.library")
  239.             (if (patmatch "68881" (database "fpu")) (set #guigfx-lib "libs/guigfx.library_FPU"))
  240.             (if (patmatch "68882" (database "fpu")) (set #guigfx-lib "libs/guigfx.library_FPU"))
  241.             (if (patmatch "68040" (database "cpu")) (set #guigfx-lib "libs/guigfx.library_68040"))
  242.             (if (patmatch "68060" (database "cpu")) (set #guigfx-lib "libs/guigfx.library_68060"))
  243.  
  244.             (copylib (prompt #copy-msg "LIBS:")
  245.                 (help @copylib-help)
  246.                 (source #guigfx-lib)
  247.                 (dest "LIBS:")
  248.                 (newname "guigfx.library")
  249.             )
  250.         )
  251.     )
  252.  
  253.  
  254.     (if (> mysticlibversion oldmysticlibversion)
  255.         (
  256.             (set #mystic-lib "libs/mysticview.library")
  257.             (if (patmatch "68881" (database "fpu")) (set #mystic-lib "libs/mysticview.library_FPU"))
  258.             (if (patmatch "68882" (database "fpu")) (set #mystic-lib "libs/mysticview.library_FPU"))
  259.             (if (patmatch "68040" (database "cpu")) (set #mystic-lib "libs/mysticview.library_FPU"))
  260.             (if (patmatch "68060" (database "cpu")) (set #mystic-lib "libs/mysticview.library_68060"))
  261.  
  262.             (copylib (prompt #copy-msg "LIBS:")
  263.                 (help @copylib-help)
  264.                 (source #mystic-lib)
  265.                 (dest "LIBS:")
  266.                 (newname "mysticview.library")
  267.             )
  268.         )
  269.     )
  270.  
  271.     (if (> neuralnetversion oldneuralnetversion)
  272.         (
  273.             (set #neuralnet-lib "libs/neuralnet.library")
  274.             (if (patmatch "68881" (database "fpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  275.             (if (patmatch "68882" (database "fpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  276.             (if (patmatch "68040" (database "cpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  277.             (if (patmatch "68060" (database "cpu")) (set #neuralnet-lib "libs/neuralnet.library_68040"))
  278.  
  279.             (copylib (prompt #copy-msg "LIBS:")
  280.                 (help @copylib-help)
  281.                 (source #neuralnet-lib)
  282.                 (dest "LIBS:")
  283.                 (newname "neuralnet.library")
  284.             )
  285.         )
  286.     )
  287.  
  288.  
  289.  
  290.     ; *** Copy the program ***
  291.  
  292.     (set #mview "MysticView")
  293.     (if (patmatch "68881" (database "fpu")) (set #mview "MysticView_030FPU"))
  294.     (if (patmatch "68882" (database "fpu")) (set #mview "MysticView_030FPU"))
  295.     (if (patmatch "68040" (database "cpu")) (set #mview "MysticView_68040"))
  296.     (if (patmatch "68060" (database "cpu")) (set #mview "MysticView_68060"))
  297.  
  298.  
  299.     (if #iconexists
  300.         (copyfiles (prompt #copy-msg #prog-dest)
  301.             (help @copyfiles-help)
  302.             (source #mview)
  303.             (dest   #prog-dest)
  304.             (newname "MysticView")
  305.         )
  306.     )
  307.  
  308.  
  309.     (if (not (= #iconexists 1))
  310.         (
  311.             (copyfiles (prompt #copy-msg #prog-dest)
  312.                 (help @copyfiles-help)
  313.                 (source #mview)
  314.                 (infos)
  315.                 (noposition)
  316.                 (dest   #prog-dest)
  317.                 (newname "MysticView")
  318.             )
  319.         )
  320.     )
  321.  
  322.  
  323.     ; *** Copy the help file ***
  324.  
  325.     (copyfiles (prompt #copy-msg #help-dest)
  326.                 (help @copyfiles-help)
  327.                 (source "MysticView.guide")
  328.                 (dest   #help-dest)
  329.                 (infos)
  330.                 (noposition)
  331.     )
  332.  
  333.  
  334.     ; *** Copy example presets ***
  335.  
  336.     (if #copypresets
  337.         (
  338.             (copyfiles (prompt #copy-msg #presets-dest)
  339.                 (help @copyfiles-help)
  340.                 (source "Prefs/Presets/MysticView_Animation")
  341.                 (dest   #presets-dest)
  342.                 (infos)
  343.                 (noposition)
  344.             )
  345.             (copyfiles (prompt #copy-msg #presets-dest)
  346.                 (help @copyfiles-help)
  347.                 (source "Prefs/Presets/MysticView_Slide_24bit")
  348.                 (dest   #presets-dest)
  349.                 (infos)
  350.                 (noposition)
  351.             )
  352.             (copyfiles (prompt #copy-msg #presets-dest)
  353.                 (help @copyfiles-help)
  354.                 (source "Prefs/Presets/MysticView_TurboThumbnail")
  355.                 (dest   #presets-dest)
  356.                 (infos)
  357.                 (noposition)
  358.             )
  359.         )
  360.     )
  361.  
  362.  
  363.  
  364.     ; ** final note
  365.  
  366.     (message #library-note)
  367.  
  368.  
  369.  
  370.     ; ** set return value of installer
  371.  
  372.     (set @default-dest #prog-dest)
  373.  
  374.